<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">会员卡管理</h4>
</div>
<div class="wrapper" ng-controller="memberCardCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            会员卡信息
        </div>
        <div class="panel-body">
            <div class="panel-default panel-body">
                <div class="m-b-lg">
                    <div class="m-b-xs">
                        <p class="block font-bold inline">无门槛会员卡</p>
                        <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6 inline" popover-placement="right" popover="商家可通过链接或者二维码发卡,不需要任何消费门槛,会员领取激活后即可享受会员权益" popover-trigger="mouseenter"></i>
                    </div>
                    <div class="member-con">
                        <div class="member-card" ui-sref="app.memberCardUpdate({id:g.id})" ng-repeat="g in generalMemberCard">
                            <div class="delete-card fa fa-times" ng-click="memberCardDel(g.id); $event.stopPropagation();" ></div>
                            <div class="member-top">
                                <p class="member-card-name">{{g.cardName}}</p>
                            </div>
                            <div>
                                <!--<p class="member-card-bar-code">{{g.cardNumber}}</p>-->
                                <p class="valid-time" ng-if="g.validTimeState==1">有效期:{{g.validStartTime.split(" ")[0]}}~{{g.validEndTime.split(" ")[0]}}</p>
                                <p class="valid-time" ng-if="g.validTimeState==0">有效期:无限制</p>
                                <p class="valid-time" ng-if="g.validTimeState==2">有效期:{{g.validDays}}天</p>
                            </div>
                            <div class="member-bottom-info">
                                <div class="card-logo" popover-placement="right" popover="使用须知：{{g.instruction}}" popover-trigger="mouseenter">CARD</div>
                                <p class="member-card-time">{{g.openTime.split(" ")[0]}}</p>
                            </div>
                        </div>
                        <div class="member-container" ui-sref="app.memberCardAdd({type:0})">
                            <p class="fa fa-plus member-plus-icon block m-n"></p>
                        </div>
                    </div>
                </div>
                <div class="m-b-lg">
                    <div class="m-b-xs">
                        <p class="block font-bold inline">按规则发放的会员卡</p>
                        <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6 inline" popover-placement="right"
                           popover="基于用户的消费行为,系统可根据商家设定的发卡规格给用户发卡,不同卡对应不同等级" popover-trigger="mouseenter"></i>
                    </div>
                    <div class="member-con">
                        <div class="member-card" ui-sref="app.memberCardUpdate({id:r.id})"  ng-repeat="r in ruleMemberCard">
                            <div class="delete-card fa fa-times" ng-click="memberCardDel(r.id); $event.stopPropagation();" ng-if="r.cardGrade == maxCard.cardGrade"></div>
                            <div class="member-top">
                                <p class="member-card-name">{{r.cardName}}</p>
                            </div>
                            <div>
                                <!--<p class="member-card-bar-code">{{r.cardNumber}}</p>-->
                                <p class="valid-time" ng-if="r.validTimeState==1">有效期:{{r.validStartTime.split(" ")[0]}}~{{r.validEndTime.split(" ")[0]}}</p>
                                <p class="valid-time" ng-if="r.validTimeState==0">有效期:无限制</p>
                                <p class="valid-time" ng-if="r.validTimeState==2">有效期:{{r.validDays}}天</p>
                            </div>
                            <div class="member-bottom-info">
                                <div class="card-logo" popover-placement="right" popover="使用须知：{{r.instruction}}" popover-trigger="mouseenter">CARD</div>
                                <p class="member-card-time">{{r.openTime.split(" ")[0]}}</p>
                            </div>
                        </div>
                        <div class="member-container" ui-sref="app.memberCardAdd({type:1})">
                            <p class="fa fa-plus member-plus-icon block m-n"></p>
                        </div>
                    </div>
                </div>
                <div class="m-b-lg">
                <div class="m-b-xs">
                    <p class="block font-bold inline">需购买的会员卡</p>
                    <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6 inline" popover-placement="right"
                       popover="需要用户购买才能获得会员卡,商家可通过链接或者二维码招募会员" popover-trigger="mouseenter"></i>
                </div>
                <div class="member-con" >
                    <div class="member-card" ui-sref="app.memberCardUpdate({id:p.id})"  ng-repeat="p in paymentMemberCard">
                        <div class="delete-card fa fa-times" ng-click="memberCardDel(p.id); $event.stopPropagation();"></div>
                        <div class="member-top">
                            <p class="member-card-name">{{p.cardName}} (售价：{{p.price}}元)</p>
                        </div>
                        <div>
                            <!--<p class="member-card-bar-code">{{p.cardNumber}}</p>-->
                            <p class="valid-time" ng-if="p.validTimeState==1">有效期:{{p.validStartTime.split(" ")[0]}}~{{p.validEndTime.split(" ")[0]}}</p>
                            <p class="valid-time" ng-if="p.validTimeState==0">有效期:无限制</p>
                            <p class="valid-time" ng-if="p.validTimeState==2">有效期:{{p.validDays}}天</p>
                        </div>
                        <div class="member-bottom-info">
                            <div class="card-logo" popover-placement="right" popover="使用须知：{{p.instruction}}" popover-trigger="mouseenter">CARD</div>
                            <p class="member-card-time">{{p.openTime.split(" ")[0]}}</p>
                        </div>
                    </div>
                    <div class="member-container" ui-sref="app.memberCardAdd({type:2})">
                        <p class="fa fa-plus member-plus-icon block m-n"></p>
                    </div>
                </div>
            </div>
            </div>
        </div>
    </div>
</div>
